package com.txazo.util;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * JDBC连接工具类
 * 
 * @author txazo
 * @since 1.0
 * 
 */
public class ConnectionUtil {

	public static final String DRIVER = "com.mysql.jdbc.Driver";
	public static final String URL = "jdbc:mysql://127.0.0.1:3306/txazo";
	public static final String USER = "root";
	public static final String PASSWORD = "root";

	public static Connection getConnection() {
		Connection connection = null;
		try {
			Class.forName(DRIVER);
			connection = DriverManager.getConnection(URL, USER, PASSWORD);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return connection;
	}

}
